package com.champ.mc.innerclass;

public class Parcel2 {
    class Contents {
        private int i = 11;
        public int value() {
            return i;
        }
    }
    class Destnation {
        private String label;
        Destnation(String whereTo) {
            this.label= whereTo;
        }
        String readLabel() {
            return label;
        }
    }
    public Destnation to(String s) {
        return new Destnation(s);
    }
    public Contents contents() {
        return new Contents();
    }
    public void ship(String dest) {
        Contents c = contents();
        Destnation d = to(dest);
        System.out.println(d.readLabel());
    }

    public static void main(String[] args) {
        Parcel2 p = new Parcel2();
        p.ship("d champ");
        Parcel2 q = new Parcel2();
        Parcel2.Contents c = q.contents();
        Parcel2.Destnation d = q.to("lele");
        // 值得注意的是在外部使用内部类的方法.需要具体的指明外部类的方法
    }
}
